package com.example.business_oa.service;

import com.example.comment_oa.dubbo.InterviewServiceDubbo;
import com.example.comment_oa.pojos.Interview;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class HymianshiService {
    @DubboReference(version = "1.0.0")
    InterviewServiceDubbo interviewServiceDubbo;

    //新增面试安排
    @GlobalTransactional(timeoutMills = 600000)
    public int addInter(Interview interview) {
        int i = interviewServiceDubbo.addInter(interview);
        return i;
    }
    //新增二次面试安排
    @GlobalTransactional(timeoutMills = 600000)
    public int addInters(Interview interview) {
        int i = interviewServiceDubbo.addInters(interview);
        return i;
    }
    //批量新增面试
    @GlobalTransactional(timeoutMills = 600000)
    public int addsmianshi(Interview interview) {
        int addsmianshi = interviewServiceDubbo.addsmianshi(interview);
        return addsmianshi;
    }
}
